<template>
  <view class="container">
    <view class="ql-editor" v-html="noticeInfo.content"></view>
  </view>
</template>

<script setup lang="ts">
import { ref, onMounted } from 'vue'
import { onLoad, onReady } from '@dcloudio/uni-app'
//api
import { baseApi } from '@/api'
//工具
import { dateFormat } from '@/utils'
import "quill/dist/quill.core.css"

const noticeId = ref('')
const noticeInfo = ref<any>({})

const getNoticeInfo = async (id:any) => {
  const {data} = await baseApi.getNoticeInfo({
    id
  })
  console.log(data)
  noticeInfo.value = data
}

onLoad((option: any) => {
  if (option) {
    noticeId.value = option.id
    getNoticeInfo(option.id)
  }
})
</script>

<style scoped>
.container{
    padding: 20rpx;
}
</style>
